home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-3.98 / gdb / Makefile.in < prev    next >
Encoding:
Makefile  |  1991-08-01  |  21.0 KB  |  611 lines

  1. ##Copyright (C) 1989-1991 Free Software Foundation, Inc.
  2.  
  3. # This file is part of GDB.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. # Host and target-dependent makefile fragments come in here.
  18. ####
  19. # End of host and target-dependent makefile fragments
  20.  
  21. # Destination directory of the software tree build
  22. destdir = /usr/local
  23.  
  24. # Place to install binaries in the destination tree. 
  25. bindir=$(destdir)/bin
  26.  
  27. # System V: If you compile gdb with a compiler which uses the coff
  28. # encapsulation feature (this is a function of the compiler used, NOT
  29. # of the m-?.h file selected by config.gdb), you must make sure that
  30. # the GNU nm is the one that is used by munch.
  31.  
  32. # If you are compiling with GCC, make sure that either 1) You use the
  33. # -traditional flag, or 2) You have the fixed include files where GCC
  34. # can reach them.  Otherwise the ioctl calls in inflow.c
  35. # will be incorrectly compiled.  The "fixincludes" script in the gcc
  36. # distribution will fix your include files up.
  37. #CC=cc
  38. #CC=gcc -traditional
  39. GCC=gcc
  40.  
  41. # Directory containing source files.  Don't clean up the spacing,
  42. # this exact string is matched for by the "configure" script.
  43. srcdir = .
  44.  
  45. # It is also possible that you will need to add -I/usr/include/sys to the
  46. # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which 
  47. # is where it should be according to Posix).
  48.  
  49. BISON=bison
  50. BISONFLAGS=-y
  51. YACC=$(BISON) $(BISONFLAGS)
  52. # YACC=yacc
  53. SHELL=/bin/sh
  54. MAKE=make
  55.  
  56. # Documentation (gdb.dvi) needs either GNU m4 or SysV m4; 
  57. # Berkeley/Sun don't have quite enough. 
  58. #M4=/usr/5bin/m4
  59. M4=gm4
  60.  
  61. # where to find texinfo; GDB dist should include a recent one
  62. TEXIDIR=${srcdir}/../texinfo/fsf
  63.  
  64. # where to find makeinfo, preferably one designed for texinfo-2
  65. MAKEINFO=makeinfo
  66.  
  67. # Set this up with gcc if you have gnu ld and the loader will print out
  68. # line numbers for undefinded refs.
  69. #CC-LD=gcc -static
  70. CC-LD=${CC}
  71.  
  72. # define this to be "gmalloc.o" if you want to use the gnu malloc routine
  73. # (useful for debugging memory allocation problems in gdb).  To use your
  74. # system malloc, uncomment the following two lines.
  75. #GNU_MALLOC =
  76. #MALLOC_CFLAGS = -DNO_MALLOC_CHECK
  77. GNU_MALLOC = gmalloc.o mcheck.o mtrace.o
  78. MALLOC_CFLAGS =
  79.  
  80. # Where is the "include" directory?  Traditionally ../include or ./include
  81. INCLUDE_DIR =  ${srcdir}/../include
  82. INCLUDE_DEP = $$(INCLUDE_DIR)
  83.  
  84. # Where is the source dir for the BFD library?  Traditionally ../bfd or ./bfd
  85. # (When we want the binary library built from it, we use ${BFD_DIR}${subdir}.)
  86. BFD_DIR =  ${srcdir}/../bfd
  87. BFD_DEP = $$(BFD_DIR)
  88. BFD_LIB = $(BFD_DIR)${subdir}/libbfd.a
  89.  
  90. # Where is the source dir for the READLINE library?  Traditionally in .. or .
  91. # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
  92. READLINE_DIR = ${srcdir}/../readline
  93. READLINE_DEP = $$(READLINE_DIR)
  94. RL_LIB = $(READLINE_DIR)${subdir}/libreadline.a
  95.  
  96. # All the includes used for CFLAGS and for lint.
  97. # -I. for config files.
  98. # -I${srcdir} possibly for regex.h also.
  99. INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share
  100.  
  101. # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS.
  102. # CFLAGS for GDB
  103. GLOBAL_CFLAGS = -g ${TM_CFLAGS} ${XM_CFLAGS}
  104. #PROFILE_CFLAGS = -pg
  105.  
  106. CFLAGS = ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MALLOC_CFLAGS} ${INCLUDE_CFLAGS}
  107. # None of the things in CFLAGS will do any harm, and on some systems
  108. #  (e.g. SunOS4) it is important to use the M_CFLAGS.
  109. LDFLAGS = $(CFLAGS)
  110.  
  111. # Where is the "-liberty" library, containing getopt and obstack?
  112. LIBIBERTY_DIR = ${srcdir}/../libiberty
  113. LIBIBERTY = ${LIBIBERTY_DIR}${subdir}/libiberty.a
  114.  
  115. # Flags that describe where you can find the termcap library.
  116. # You may need to make other arrangements for USG.
  117. TERMCAP = -ltermcap
  118.  
  119. # The xconfig file must define REGEX and REGEX1 on USG machines.
  120. # If your sysyem is missing alloca(), or, more likely, it's there but
  121. # it doesn't work, define ALLOCA & ALLOCA1 too.
  122. # If your system is missing putenv(), add putenv.c to XM_ADD_FILES.
  123.  
  124. # Libraries and corresponding dependencies for compiling gdb.
  125. # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
  126. # TERMCAP comes last, since readline depends on it.
  127. CLIBS = $(XM_CLIBS) ${TM_CLIBS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB} ${TERMCAP}
  128. CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${LIBIBERTY} ${RL_LIB}
  129.  
  130. ADD_FILES = ${REGEX} ${ALLOCA}  ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
  131. ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} ${XM_ADD_FILES} ${TM_ADD_FILES}
  132.  
  133. VERSION = 3.98
  134. DIST=gdb
  135.  
  136. LINT=/usr/5bin/lint
  137. LINTFLAGS=
  138.  
  139. # Source files in the main directory.
  140. # Files which are included via a tconfig/* or xconfig/* file 
  141. # should *not* be specified here; they're in "ALLDEPFILES".
  142. SFILES_MAINDIR = \
  143.      blockframe.c breakpoint.c command.c core.c \
  144.      environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
  145.      main.c printcmd.c \
  146.      remote.c source.c stack.c symmisc.c symtab.c symfile.c \
  147.      utils.c valarith.c valops.c valprint.c values.c expread.y \
  148.      signame.c cplus-dem.c mem-break.c target.c inftarg.c \
  149.      dbxread.c coffread.c \
  150.      ieee-float.c 
  151.  
  152. # Source files in subdirectories (which will be handled separately by
  153. #  'make gdb.tar.Z').
  154. # Files which are included via a tconfig/* or xconfig/* file 
  155. # should *not* be specified here; they're in "ALLDEPFILES".
  156. SFILES_SUBDIR = \
  157.      ${srcdir}/vx-share/dbgRpcLib.h \
  158.      ${srcdir}/vx-share/ptrace.h \
  159.      ${srcdir}/vx-share/reg.h \
  160.      ${srcdir}/vx-share/vxTypes.h \
  161.      ${srcdir}/vx-share/vxWorks.h \
  162.      ${srcdir}/vx-share/wait.h \
  163.      ${srcdir}/vx-share/xdr_ld.h \
  164.      ${srcdir}/vx-share/xdr_ptrace.h \
  165.      ${srcdir}/vx-share/xdr_rdb.h \
  166.      ${srcdir}/vx-share/xdr_regs.h \
  167.      ${srcdir}/nindy-share/b.out.h \
  168.      ${srcdir}/nindy-share/block_io.h \
  169.      ${srcdir}/nindy-share/coff.h \
  170.      ${srcdir}/nindy-share/demux.h \
  171.      ${srcdir}/nindy-share/env.h \
  172.      ${srcdir}/nindy-share/stop.h \
  173.      ${srcdir}/nindy-share/ttycntl.h
  174.  
  175. # Non-source files in subdirs, that should go into gdb.tar.Z.
  176. NONSRC_SUBDIR = \
  177.      ${srcdir}/nindy-share/Makefile \
  178.      ${srcdir}/nindy-share/VERSION
  179.  
  180. # All source files that go into linking GDB, except config-specified files.
  181. SFILES = $(SFILES_MAINDIR) $(SFILES_SUBDIR)
  182.  
  183. # All source files that lint should look at
  184. LINTFILES = $(SFILES) expread.tab.c init.c
  185.  
  186. # Documentation source files
  187. SFILES_DOCDIR = \
  188.     ${srcdir}/doc/gdb.texinfo    \
  189.     ${srcdir}/doc/pretex.m4      \
  190.     ${srcdir}/doc/none.m4        \
  191.     ${srcdir}/doc/all.m4         \
  192.     ${srcdir}/doc/gdbinv-m.m4   \
  193.     ${srcdir}/doc/gdbinv-s.m4   
  194.  
  195. # Any additional files specified on these lines should also be added to
  196. # the OTHERS = definition below, so they go in the tar files.
  197. SFILES_STAND = $(SFILES) standalone.c
  198. SFILES_KGDB  = $(SFILES) stuff.c kdb-start.c
  199.  
  200. # Header files that are not named in tconfig/* or xconfig/* go here.
  201. HFILES=    breakpoint.h command.h defs.h environ.h \
  202.     expression.h frame.h gdbcmd.h gdbcore.h \
  203.     getpagesize.h ieee-float.h inferior.h param-no-tm.h param.h \
  204.     signals.h signame.h symfile.h symtab.h \
  205.     target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \
  206.     value.h
  207.  
  208. # Header files for machine opcode tables.
  209. # when OPCODE_DIR changes to ../include, remove the whole $(OPCODES)
  210. # business, since they will be included in the separate includes tar file
  211. # rather than in the gdb tar file.
  212. OPCODE_DIR =
  213. OPCODES = $(OPCODE_DIR)pn-opcode.h $(OPCODE_DIR)np1-opcode.h \
  214.     $(OPCODE_DIR)sparc-opcode.h $(OPCODE_DIR)vax-opcode.h \
  215.     $(OPCODE_DIR)m68k-opcode.h $(OPCODE_DIR)ns32k-opcode.h \
  216.     $(OPCODE_DIR)convx-opcode.h $(OPCODE_DIR)pyr-opcode.h \
  217.     $(OPCODE_DIR)mips-opcode.h $(OPCODE_DIR)am29k-opcode.h \
  218.     $(OPCODE_DIR)arm-opcode.h $(OPCODE_DIR)m88k-opcode.h \
  219.     $(OPCODE_DIR)tahoe-opcode.h
  220.  
  221. REMOTE_EXAMPLES = m68k-stub.c i386-stub.c rem-multi.shar
  222.  
  223. MALLOCSRC = gmalloc.c mcheck.c mtrace.c mtrace.awk \
  224.         ansidecl.h gmalloc.h
  225.  
  226. POSSLIBS_MAINDIR = regex.c regex.h alloca.c $(MALLOCSRC)
  227. POSSLIBS = $(POSSLIBS_MAINDIR)
  228.  
  229. TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
  230.  
  231. # tdesc-lib cannot be named simply tdesc, because if it were, GNU make
  232. # would try to make it from tdesc.c.
  233. # tdesc-lib removed from the list due to Motorola copyrights...gnu@cygnus.com
  234. OTHERS = Makefile.in depend alldeps.mak \
  235.      createtags munch configure configure.in \
  236.      ChangeLog ChangeLog-3.x \
  237.      README TODO TAGS WHATS.NEW Projects \
  238.      .gdbinit COPYING expread.tab.c \
  239.      copying.c Convex.notes copying.awk \
  240.      saber.suppress standalone.c stuff.c kdb-start.c \
  241.      putenv.c
  242.  
  243. # Subdirectories of gdb, which should be included in their entirety in
  244. # gdb-xxx.tar.Z:
  245. TARDIRS = doc hp-include # tests
  246.  
  247. # GDB "info" files, which should be included in their entirety
  248. INFOFILES = gdb.info*
  249.  
  250. DEPFILES= ${TDEPFILES} ${XDEPFILES}
  251.  
  252. SOURCES=$(SFILES) $(ALLDEPFILES)
  253. TAGFILES = $(SOURCES) ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS} 
  254. TAGFILES_MAINDIR = $(SFILES_MAINDIR) $(ALLDEPFILES_MAINDIR) \
  255.              ${HFILES} ${OPCODES} ${ALLPARAM} ${POSSLIBS_MAINDIR} 
  256. TARFILES = ${TAGFILES_MAINDIR} ${OTHERS} ${REMOTE_EXAMPLES}
  257.  
  258. OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
  259.     values.o eval.o valops.o valarith.o valprint.o printcmd.o \
  260.     symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o \
  261.     command.o utils.o expread.o expprint.o environ.o version.o \
  262.     copying.o $(DEPFILES) signame.o cplus-dem.o mem-break.o target.o \
  263.     inftarg.o ieee-float.o putenv.o \
  264.     dbxread.o coffread.o # mipsread.o
  265.  
  266. RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES)
  267.  
  268. TSOBS = core.o inflow.o
  269.  
  270. NTSOBS = standalone.o
  271.  
  272. TSSTART = /lib/crt0.o
  273.  
  274. NTSSTART = kdb-start.o
  275.  
  276. # Prevent Sun make from putting in the machine type.  Setting
  277. # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
  278. .c.o:
  279.     ${CC} -c ${CFLAGS} $<
  280.  
  281. all: gdb
  282.  
  283. install: gdb
  284.     cp gdb $(bindir)/gdb.new
  285.     mv $(bindir)/gdb.new $(bindir)/gdb
  286.     $(M_INSTALL)
  287.  
  288. init.c: $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(TSOBS)
  289.     $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
  290.  
  291. gdb: $(OBS) $(TSOBS) ${ADD_DEPS} ${CDEPS} init.o
  292.     ${CC-LD} $(LDFLAGS) -o gdb init.o $(OBS) $(TSOBS) $(ADD_FILES) \
  293.       $(CLIBS)
  294.  
  295. saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
  296.     #setopt load_flags $(CFLAGS) -I$(BFD_DIR) -DHOST_SYS=SUN4_SYS
  297.     #load ./init.c $(SFILES)
  298.     #unload ${srcdir}/expread.y ${srcdir}/vx-share/*.h
  299.     #unload ${srcdir}/nindy-share/[A-Z]*
  300.     #load ${srcdir}/expread.tab.c
  301.     #load copying.c version.c
  302.     #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
  303.     #load ${LIBIBERTY_DIR}/*.c
  304.     #load ${BFD_DIR}/*.c
  305.     #load ${READLINE_DIR}/*.c
  306.     #load -ltermcap 
  307.     ##void mcheck(a) void (*a)(); { }
  308.     ##void mtrace() { }
  309.  
  310.  
  311.  
  312. # This is useful when debugging GDB, because some Unix's don't let you run GDB
  313. # on itself without copying the executable.  So "make gdb1" will make
  314. # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
  315. # Removing gdb1 before the copy is the right thing if gdb1 is open
  316. # in another process.
  317. gdb1: gdb
  318.     rm -f gdb1
  319.     cp gdb gdb1
  320.  
  321. # This is a remote stub which runs under unix and starts up an
  322. # inferior process.  This is at least useful for debugging GDB's
  323. # remote support.
  324. rapp: $(RAPP_OBS)
  325.     rm -f rapp_init.c
  326.     ${srcdir}/munch ${RAPP_OBS} > rapp_init.c
  327.     ${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
  328.     
  329. # Support for building Makefile out of configured pieces, automatically
  330. # generated dependencies, etc.  alldeps.mak is a file that contains
  331. # "make" variable definitions for all ALLDEPFILES, ALLDEPFILES_MAINDIR,
  332. # ALLDEPFILES_SUBDIR, ALLPARAM, and ALLCONFIG, all cadged from the current
  333. # contents of the xconfig and tconfig subdirectories.
  334.  
  335. alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
  336.     rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
  337.     for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
  338.             ${srcdir}/xconfig/*[0-9A-Za-z] | \
  339.         grep -v RCS | grep -v CVS.adm | grep -v SCCS` ; do \
  340.       echo $$i >>allconfig.tmp; \
  341.       awk <$$i ' \
  342.         $$1 == "TDEPFILES=" || $$1 == "XDEPFILES=" { \
  343.           for (i = 2; i <= NF; i++) \
  344.             print $$i >> "alldeps.tmp" ; \
  345.             } \
  346.         $$1 == "TM_FILE=" || $$1 == "XM_FILE=" { \
  347.           print $$2 >> "allparam.tmp" }' ; \
  348.     done
  349.     sort <alldeps.tmp | uniq | \
  350.       sed -e 's/arm-convert.o/arm-convert.s/' \
  351.           -e 's!^Onindy.o!nindy-share/Onindy.c!' \
  352.           -e 's!^nindy.o!nindy-share/nindy.c!' \
  353.           -e 's!ttybreak.o!nindy-share/ttybreak.c!' \
  354.           -e 's!ttyflush.o!nindy-share/ttyflush.c!' \
  355.           -e 's!xdr_ld.o!vx-share/xdr_ld.c!' \
  356.           -e 's!xdr_ptrace.o!vx-share/xdr_ptrace.c!' \
  357.           -e 's!xdr_rdb.o!vx-share/xdr_rdb.c!' \
  358.           -e 's!xdr_regs.o!vx-share/xdr_regs.c!' \
  359.           -e 's/\.o/.c/' \
  360.         >alldeps2.tmp
  361.     echo '# Start of "alldeps.mak" definitions' \
  362.         >>alldeps.mak;
  363.     echo 'ALLDEPFILES = $$(ALLDEPFILES_MAINDIR) $$(ALLDEPFILES_SUBDIR)' \
  364.         >>alldeps.mak;
  365.     grep -v / alldeps2.tmp | \
  366.       awk 'BEGIN {printf "ALLDEPFILES_MAINDIR="} \
  367.         NR == 0 {printf $$0;} \
  368.         NR != 0 {printf "\\\n" $$0} \
  369.         END {printf "\n\n"}' >>alldeps.mak;
  370.     grep / alldeps2.tmp | \
  371.       awk 'BEGIN {printf "ALLDEPFILES_SUBDIR="} \
  372.         NR == 0 {printf $$0;} \
  373.         NR != 0 {printf "\\\n" $$0} \
  374.         END {printf "\n\n"}' >>alldeps.mak;
  375.     sort <allparam.tmp | uniq | awk 'BEGIN {printf "ALLPARAM="} \
  376.         NR == 0 {printf $$0;} \
  377.         NR != 0 {printf "\\\n" $$0} \
  378.         END {printf "\n\n"}' >>alldeps.mak;
  379.     sort <allconfig.tmp | uniq | awk 'BEGIN {printf "ALLCONFIG="} \
  380.         NR == 0 {printf $$0;} \
  381.         NR != 0 {printf "\\\n" $$0} \
  382.         END {printf "\n\n"}' >>alldeps.mak;
  383.     echo '# End of "alldeps.mak" definitions' \
  384.         >>alldeps.mak;
  385.     rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
  386.  
  387. # The sed script makes everything which depends on {x,t}m.h depend on
  388. # config.status as well, in case someone reconfigures gdb out from
  389. # under an already compiled gdb.
  390. depend: $(SOURCES) Makefile.in
  391.     @echo Ignore errors about non-existent system-supplied include files
  392.     @echo for systems other than the one you are using.
  393.     @echo "If xm.h and tm.h don't exist, the error messages saying so"
  394.     @echo can safely be ignored.
  395.     @echo Also ignore parse errors in valops.c, and any errors in
  396.     @echo arm-convert.s.
  397.     -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \
  398.       `ls $(SOURCES) | grep -v '\.[hy]$$' |sort -u` >depend.tmp
  399. # If running in srcdir, translate "./foo.c" into "$srcdir/foo.c" except
  400. # for xm.h and tm.h.  This allows the same "depend" file to be used
  401. # by the various subdirectories.
  402.     if [ "${srcdir}" = "." ] ; then \
  403.       <depend.tmp sed \
  404.         -e 's; ./xm.h; xm.h;g'  \
  405.         -e 's; ./tm.h; tm.h;g'  \
  406.         -e 's; \./; $${srcdir}/;g'  \
  407.         -e 's; vx-share/; $${srcdir}/vx-share/;g'  \
  408.         -e 's; nindy-share/; $${srcdir}/nindy-share/;g'  \
  409.         >depend.tm2; \
  410.       rm depend.tmp; \
  411.       mv depend.tm2 depend.tmp; \
  412.     fi
  413.     <depend.tmp sed \
  414.       -e 's; [xt]m.h;& config.status;g'  \
  415.       -e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g'  \
  416.       -e 's; $(READLINE_DIR)/; $(READLINE_DEP)/;g'  \
  417.       -e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g'  \
  418.       -e 's; ./xm.h; xm.h config.status;g'  \
  419.       -e 's; ./tm.h; tm.h config.status;g'  \
  420.       >depend
  421.     rm depend.tmp
  422.  
  423. config.status:
  424.     @echo "You must configure gdb.  Look at the README file for details."
  425.     @false
  426.  
  427. # These are not generated by "make depend" because they only are there
  428. # for some machines.
  429. # But these rules don't do what we want; we want to hack the foo.o: tm.h
  430. # dependency to do the right thing.
  431. tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h : tm-68k.h
  432. tm-hp300hpux.h tm-sun2.h tm-3b1.h : tm-68k.h
  433. xm-news1000.h : xm-news.h
  434. xm-i386-sv32.h : xm-i386.h
  435. tm-i386gas.h: tm-i386.h
  436. xm-sun4os4.h : xm-sparc.h
  437. tm-sun4os4.h : tm-sparc.h
  438.  
  439. kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${CDEPS}
  440.     rm -f init.c
  441.     $(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
  442.     $(CC) $(LDFLAGS) -c init.c $(CLIBS) 
  443.     ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
  444.       -lc $(CLIBS)
  445.  
  446. # Put the proper machine-specific files first.
  447. # createtags will edit the .o in DEPFILES into .c
  448. TAGS: ${TAGFILES}
  449.     $(srcdir)/createtags $(TM_FILE) ${XM_FILE} $(DEPFILES) ${TAGFILES}
  450. tags: TAGS
  451.  
  452. gdb.tar.Z: force_update
  453.     ./configure none
  454.     rm -f alldeps.mak
  455.     $(MAKE) $(MFLAGS) alldeps.mak
  456.     ./configure none
  457.     rm -f depend
  458.     $(MAKE) $(MFLAGS) depend
  459.     ./configure none
  460.     $(MAKE) $(MFLAGS) gdb.info
  461.     $(MAKE) $(MFLAGS) gdb-$(VERSION).tar.Z
  462.  
  463. gdb-$(VERSION).tar.Z: ${TARFILES} ${TARDIRS} gdb.info
  464.     rm -f gdb.tar gdb-$(VERSION).tar.Z; rm -rf $(DIST)
  465.     mkdir $(DIST)
  466.     cd $(DIST) ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
  467.     cd $(DIST) ; ln -s ../${INFOFILES} .
  468.     cd $(DIST); for i in ${TARDIRS}; do \
  469.       (mkdir $$i; cd $$i; \
  470.       ln -s ../../$$i/* .; \
  471.       rm -rf SCCS CVS.adm RCS); done
  472.     mkdir $(DIST)/xconfig ${DIST}/tconfig
  473.     cd $(DIST)/tconfig ; \
  474.       for i in $(ALLCONFIG) ; do ln -s ../../$$i ../$$i ; done
  475.     mkdir $(DIST)/vx-share $(DIST)/nindy-share
  476.     cd $(DIST)/tconfig ; \
  477.       for i in $(SFILES_SUBDIR) $(NONSRC_SUBDIR) $(ALLDEPFILES_SUBDIR); \
  478.         do ln -s ../../$$i ../$$i ; done
  479.     chmod og=u `find . -print`
  480.     tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
  481.     rm -rf $(DIST)
  482.  
  483. clean:
  484.     rm -f ${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES}
  485.     rm -f init.c init.o version.c
  486.     rm -f gdb core gdb.tar gdb.tar.Z make.log
  487.     rm -f gdb[0-9]
  488.     rm -f gdb.dvi rdl-apps.texinfo gdb-all*
  489.  
  490. distclean: clean expread.tab.c TAGS
  491.     rm -f tm.h xm.h config.status
  492.     rm -f y.output yacc.acts yacc.tmp
  493.     rm -f ${TESTS} Makefile depend
  494.  
  495. realclean: clean
  496.     rm -f expread.tab.c TAGS
  497.     rm -f tm.h xm.h config.status
  498.     rm -f Makefile depend
  499.  
  500. # Documentation!
  501.  
  502. rdl-apps.texinfo: ${READLINE_DIR}/inc-readline.texinfo \
  503.             ${READLINE_DIR}/inc-history.texinfo
  504.     echo "@include ${READLINE_DIR}/inc-readline.texinfo" >rdl-apps.texinfo
  505.     echo "@include ${READLINE_DIR}/inc-history.texinfo" >>rdl-apps.texinfo
  506.  
  507. # Be sure to not create a bad gdb-all.texinfo if ${M4} is missing or aborts...
  508. gdb-all.texinfo: ${SFILES_DOCDIR}
  509.     rm -f gdb-all.texinfo foobus.texinfo
  510.     ( cd $(srcdir)/doc; \
  511.         ${M4} pretex.m4 none.m4 all.m4 gdb.texinfo ) >foobus.texinfo
  512.     mv foobus.texinfo gdb-all.texinfo
  513.  
  514. gdb.dvi : gdb-all.texinfo rdl-apps.texinfo
  515.     TEXINPUTS=${TEXIDIR}:$$TEXINPUTS tex gdb-all.texinfo
  516.     texindex gdb-all.??
  517.     TEXINPUTS=${TEXIDIR}:$$TEXINPUTS tex gdb-all.texinfo
  518.     mv gdb-all.dvi gdb.dvi
  519.     rm -f gdb-all.?? gdb-all.???
  520.  
  521. # We're using texinfo2, and older makeinfo's may not be able to
  522. # cope with all the markup.  In the meantime, we distribute the info
  523. # files as formatted by the elisp texinfo2 code.
  524. gdb.info: gdb-all.texinfo
  525.     ${MAKEINFO} gdb-all.texinfo
  526.  
  527. # Make copying.c from COPYING
  528. copying.c : COPYING copying.awk
  529.     awk -f copying.awk < COPYING > copying.c
  530.  
  531. version.c : Makefile.in
  532.     echo 'char *version = "$(VERSION)";' >version.c
  533.  
  534. # expread.tab.c is generated in srcdir from expread.y, then compiled in target
  535. # directory to expread.o.
  536. ${srcdir}/expread.tab.c : $(srcdir)/expread.y
  537.     @echo 'Expect 4 shift/reduce conflicts.'
  538.     ${YACC} $(srcdir)/expread.y
  539.     mv y.tab.c ${srcdir}/expread.tab.c
  540.  
  541. expread.o : ${srcdir}/expread.tab.c defs.h param.h symtab.h \
  542.             frame.h expression.h value.h command.h
  543.     $(CC) -c ${CFLAGS} `echo ${srcdir}/expread.tab.c | sed 's,^\./,,'`
  544.     mv expread.tab.o expread.o
  545.  
  546. # dbxread, coffread, mipsread have dependencies on BFD header files.
  547. dbxread.o: ${srcdir}/dbxread.c
  548.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/dbxread.c
  549.  
  550. coffread.o: ${srcdir}/coffread.c
  551.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/coffread.c
  552.  
  553. mipsread.o: ${srcdir}/mipsread.c
  554.     ${CC} -c ${CFLAGS} -I$(BFD_DIR) ${srcdir}/mipsread.c
  555.  
  556. # Drag in the files that are in another directory.
  557.  
  558. xdr_ld.o: ${srcdir}/vx-share/xdr_ld.c
  559.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ld.c
  560.  
  561. xdr_ptrace.o: ${srcdir}/vx-share/xdr_ptrace.c
  562.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_ptrace.c
  563.  
  564. xdr_rdb.o: ${srcdir}/vx-share/xdr_rdb.c
  565.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_rdb.c
  566.  
  567. xdr_regs.o: ${srcdir}/vx-share/xdr_regs.c
  568.     ${CC} -c ${CFLAGS} ${srcdir}/vx-share/xdr_regs.c
  569.  
  570. nindy.o: ${srcdir}/nindy-share/nindy.c
  571.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/nindy.c
  572.  
  573. Onindy.o: ${srcdir}/nindy-share/Onindy.c
  574.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/Onindy.c
  575.  
  576. ttybreak.o: ${srcdir}/nindy-share/ttybreak.c
  577.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttybreak.c
  578.  
  579. ttyflush.o: ${srcdir}/nindy-share/ttyflush.c
  580.     ${CC} -c ${CFLAGS} ${srcdir}/nindy-share/ttyflush.c
  581.  
  582. tdesc-lib/libdc.o : force_update
  583.     cd tdesc-lib ; ${MAKE} "SYSV_DEFINE=${SYSV_DEFINE}"
  584.  
  585. lint: $(LINTFILES)
  586.     $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES)
  587.  
  588. gdb.cxref: $(SFILES)
  589.     cxref -I. $(SFILES) >gdb.cxref
  590.  
  591. force_update :
  592.  
  593. # When used with GDB, the demangler should never look for leading
  594. # underscores because GDB strips them off during symbol read-in.  Thus
  595. # -Dnounderscore.  
  596.  
  597. cplus-dem.o : cplus-dem.c
  598.     ${CC} -c ${CFLAGS} -Dnounderscore \
  599.       `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'`
  600.  
  601. # This is the end of "Makefile.in".  When built into "Makefile"
  602. # by the configure script, two things are added below this point:
  603. #     alldeps.mak -- defintions of all files that are used in
  604. #            host- or target-dependent configurations
  605. #    depend -- what .o files depend on what .c and .h files,
  606. #            for all configurations.
  607.  
  608.  
  609.